package com.qs.auto.action;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qs.auto.bean.CarBean;
import com.qs.auto.service.QuotesService;
import com.qs.core.manager.ServiceLocator;

@Controller
@RequestMapping("/")
public class MainController{
 
   @RequestMapping("demo")
   public @ResponseBody CarBean demo(ModelMap model) {
	  QuotesService service = (QuotesService)ServiceLocator.getBean("quotesService");
	  try {
		System.out.println(service.getString("108"));
	} catch (Exception e) {
		e.printStackTrace();
	}
    return new CarBean("Figo", 1, 2013, "Ford");
   }

}